<template>
	<view>
		<!-- 日期 只有在我的足迹传送过来的时候才显示-->
		<!-- <text class="fs30" v-if="type==3">2020-08-30</text> -->
		<view class="flex flex-wrap row-between w-max">
			<view class="radius16 goodsItem" v-for="(item,i) in goodslist" :key='i' @click="$jump('/subpkg/goodsDetail/goodsDetail?spu='+item.spu)">
				<!-- 上面的图片 -->
				<image :src="item.img" class="w-max h330 radius16"></image>
				<!-- //上面的图片 -->
				<!-- 下面的盒子 -->
				<view class="mt20 pl20 pr20 ">
					<view class="mb20">{{item.name}}</view>
					<view class="flex row-between col-center">
						<view class="color9 fs24">
							<text>销量 </text>
							<text>{{item.virtual_sales+item.sales}}</text>
						</view>
						<text class="color-red fs36">¥ {{item.price}}</text>
					</view>
				</view>
				<!-- //下面的盒子 -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "goodsList",
		props:{
			goodslist:{
				type:Array,
				// required:true
			}
		},
		data() {
			return {
			};
		}
	}
</script>

<style lang="scss">
	.goodsItem {
		width: 48%;
		background-color: #FFFFFF;
		padding-bottom: 20rpx;
		margin-top: 30rpx;
	}
</style>
